home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib43 / mntlib / makefile.adm < prev    next >
Makefile  |  1994-01-15  |  3KB  |  118 lines

  1. #
  2. # Makefile.adm
  3. #
  4. # Makefile for administrative functions.
  5. # You shouldn't need to use anything in here.
  6. #
  7.  
  8. include Files
  9. include Version
  10.  
  11. incdir=/usr/include
  12. srcdir=/src/mntlib
  13. dist=/src/mntlib/dist
  14. c=$(dist)/Changelog.$V.jrb
  15. m=$(dist)/Changelog.$V
  16. t=$(dist)/change.tmp
  17. h=$(dist)/diffh
  18. s=$(dist)/diffc
  19. b=$(dist)/diffc.jrb
  20. f=/tmp/Files.tmp
  21. r=/tmp/rcsFiles.tmp
  22. d=/tmp/diffFiles.tmp
  23.  
  24. all: nothing
  25.  
  26. FIXUPCMD=tr ' ' '\012' | sort -u | pr -5 -t -l1 | sed 's/$$/ \\/'
  27.  
  28. #
  29. # Pretty print the Files list.
  30. #
  31. ppfiles:
  32.     chmod u+w Files
  33.     cp Files /tmp
  34.     echo ""                    >  Files
  35.     echo "COMMON= \\"            >> Files
  36.     echo $(COMMON) | $(FIXUPCMD)        >> Files
  37.     echo ""                    >> Files
  38.     echo "MINTLIB= \\"            >> Files
  39.     echo $(MINTLIB) | $(FIXUPCMD)        >> Files
  40.     echo ""                    >> Files
  41.     echo "MINTLIB_NOCL= \\"            >> Files
  42.     echo $(MINTLIB_NOCL) | $(FIXUPCMD)    >> Files
  43.     echo ""                    >> Files
  44.     echo "CRUFT= \\"            >> Files
  45.     echo $(CRUFT) | $(FIXUPCMD)        >> Files
  46.     echo ""                    >> Files
  47.  
  48. #
  49. # Compare the Files list to the actual files to catch discrepancies.
  50. #
  51. checkfiles:
  52.     echo $(COMMON) $(MINTLIB) $(MINTLIB_NOCL) $(CRUFT) | tr ' ' '\012' \
  53.         | sort -u > $f
  54.     rlog -R RCS/* | sed -e 's;^RCS/;;' -e 's;,v$$;;' > $r
  55.     -diff -u $f $r > $d
  56.     rm $f $r
  57.     less $d
  58.     rm $d
  59.  
  60. changelogs:
  61.     rlog -r`expr $V - 1`.2:$V.1 $(COMMON) | MKLOG \
  62.         | sed 's;DIRECTORY_NAME/;;' > $c
  63.     rlog -r`expr $V - 1`.2:$V.1 $(incdir)/RCS/* | MKLOG \
  64.         | sed 's;DIRECTORY_NAME/;include/;' >> $c
  65.     rlog -r`expr $V - 1`.2:$V.1 $(incdir)/sys/RCS/* | MKLOG \
  66.         | sed 's;DIRECTORY_NAME/;include/sys/;' >> $c
  67.     cp $c $m
  68.     rlog -r`expr $V - 1`.2:$V.1 $(MINTLIB) | MKLOG \
  69.         | sed 's;DIRECTORY_NAME/;;' >> $m
  70.     for dir in crlf lattice purec purec/unixname sozobon ;\
  71.     do \
  72.         rlog -r`expr $V - 1`.2:$V.1 $$dir/RCS/* | MKLOG \
  73.             | sed "s;DIRECTORY_NAME/;$$dir/;" >> $m ; \
  74.     done
  75.     sed -e "s/author: root/author: entropy/" -e "s/locked by:.*$$//" \
  76.             < $c > $t
  77.     mv $t $c
  78.     sed -e "s/author: root/author: entropy/" -e "s/locked by:.*$$//" \
  79.             < $m > $t
  80.     mv $t $m
  81.  
  82. distrib:
  83.     MKDIFFS `expr $V - 1` $(dist)/src $(COMMON) > $b
  84.     cp $b $s
  85.     MKDIFFS `expr $V - 1` $(dist)/src $(MINTLIB_NOCL) >> $s
  86.     MKDIFFS `expr $V - 1` $(dist)/src $(MINTLIB) >> $s
  87.     for dir in crlf lattice purec purec/unixname sozobon ;\
  88.     do \
  89.           MKDIFFS `expr $V - 1` $(dist)/src $$dir/RCS/* >> $s ; \
  90.     done
  91.     rm -f $h
  92.     cd $(incdir) ; for dir in . sys ;\
  93.     do \
  94.           $(srcdir)/MKDIFFS `expr $V - 1` $(dist)/include $$dir/RCS/* >> $h ; \
  95.     done
  96.  
  97. newversion:
  98.     for dir in $(srcdir) $(srcdir)/crlf $(srcdir)/lattice \
  99.         $(srcdir)/purec $(srcdir)/purec/unixname \
  100.         $(srcdir)/sozobon $(incdir) $(incdir)/sys ;\
  101.     do \
  102.       cd $$dir ;\
  103.       ci -l -f -m- -r$V.1 RCS/* ;\
  104.       co -f -l RCS/* ;\
  105.     done
  106.     echo '/*' > PatchLev.h
  107.     echo ' *    This identifies the version of the MiNT library in this' >> PatchLev.h
  108.     echo ' *    directory.' >> PatchLev.h
  109.     echo ' */' >> PatchLev.h
  110.     echo '' >> PatchLev.h
  111.     cp PatchLev.h $(incdir)/PatchLev.h
  112.     echo '#define PatchLevel "'`expr $V + 1`'"' >> PatchLev.h
  113.     echo '#define _PatchLevel "'`expr $V + 1`'"' >> $(incdir)/PatchLev.h
  114.     echo 'V='`expr $V + 1` > Version
  115.     ci -f -l -m- Version
  116.     ci -f -l -m- PatchLev.h
  117.     cd $(incdir) ; ci -f -l -m- PatchLev.h
  118.